<?php if (!defined('THINK_PATH')) exit(); /*a:1:{s:70:"F:\NetBeansProjects\forum/application/user\view\register\register.html";i:1493815804;}*/ ?>
<!DOCTYPE html>
<!--
To change this license header, choose License Headers in Project Properties.
To change this template file, choose Tools | Templates
and open the template in the editor.
-->
<html>
<head>
    <title>注册页面</title>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <script src="https://cdn.bootcss.com/jquery/1.10.2/jquery.js"></script>
    <script>
        function register() {
            var user=$("#user").val();
            var pwd=$("#pwd").val();
            $.post("/forum/index.php/user/Register/register",{"user":user,"pwd":pwd},function (data) {
                if (data==="success"){
                    alert("注册成功！");
                    window.location.href='/forum/index.php';
                }else {
                    alert("注册失败！请检查！");
                }
            })
        }
    </script>
</head>
<body>
用户名：<input type="text" id="user">
<br><br>
密码：<input type="password" id="pwd">
<br><br>
<button onclick="register()">注册</button>
</body>
</html>
